package com.lxl.gateway;

import com.lxl.filter.AuthFilter;
import com.lxl.filter.FormatFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@EnableZuulProxy
@EnableJpaRepositories("com.lxl.jpa")
@EntityScan("com.lxl.entity")
@ComponentScan("com.lxl.controller,com.lxl.configuration")
@SpringCloudApplication
public class GatewayApplication {

	public static void main(String[] args) {
		SpringApplication.run(GatewayApplication.class, args);
	}

	@Bean
	public AuthFilter authFilter(){
		return new AuthFilter();
	}

	@Bean
	public FormatFilter formatFilter(){
		return new FormatFilter();
	}
}
